package com.jww.dao.provider;

import com.jww.pojo.Provider;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface providerDao {
    // 查询提供公司名称
    public List<Provider> queryProvider(Connection conn) throws SQLException;

    // 增加供应商
    public int add(Connection connection, Provider provider) throws Exception;

    // 通过供应商名称、编码获取供应商列表-模糊查询-providerList
    public List<Provider> getProviderList(Connection connection, String proName, String proCode) throws Exception;

    // 通过proId删除Provider
    public int deleteProviderById(Connection connection, int delId) throws Exception;

    // 通过proId获取Provider
    public Provider getProviderById(Connection connection, int id) throws Exception;

    // 修改供应商信息
    public int modify(Connection connection, Provider provider) throws Exception;

    // 根据proCode查询供应商是否存在，用于检查供应商编码唯一性
    public Provider selectProCodeExist(Connection connection, String proCode) throws Exception;

}
